package com.baidu.disk.java8test;

import java.io.IOException;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

/**
 * Created by CJ on 2018-04-14.
 */
public class Responsive extends  Thread implements Thread.UncaughtExceptionHandler{



    private static  double d = 1;
    public  Responsive(){
        setDaemon(true);
        start();
    }

    @Override
    public void run() {
        while (true) {
            d = d + (Math.PI + Math.E) / d;
        }
    }

    public static void main(String[] args) throws IOException {
        new Responsive();
        System.in.read();
        System.out.println(d);
    }

    @Override
    public void uncaughtException(Thread t, Throwable e) {
        System.out.println("错误"+t);
    }
}
